package com.heima.demo.controller;

import com.heima.demo.pojo.Student;
import freemarker.template.Configuration;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * @author Fuqiang
 * @since :2023-03-28
 */
@Controller
public class FreeMarkerController {

    @Autowired
    Configuration configuration;

    @GetMapping("/demo01")
    public String demo01(Model model) {

        model.addAttribute("name", "java");
        model.addAttribute("stu", new Student("张三", 13));
        return "01-basic";
    }
}
